frappe.ui.form.Form = class LTFrappeForm extends frappe.ui.form.Form {
	switch_doc(docname) {
		// reset visible columns, since column headings can change in different docs
		this.grids.forEach((grid_obj) => {
			grid_obj.grid.visible_columns = null;
			// reset page number to 1
            // 修改子表 max=10 后单据 form 不刷新的问题
			grid_obj.grid.grid_pagination?.go_to_page(1, true);
		});
		frappe.ui.form.close_grid_form();
		this.viewers && this.viewers.parent.empty();
		this.docname = docname;
		this.setup_docinfo_change_listener();
	}
};
